package cn.chia.pojo;

import java.util.Date;

/**
 * TblShopcarId entity. @author MyEclipse Persistence Tools
 */

public class TblShopcarId implements java.io.Serializable {

	// Fields

	private Integer shopcarId;
	private User user;
	private TblItems tblItems;
	private Date date;
	private Integer num;

	// Constructors

	/** default constructor */
	public TblShopcarId() {
	}

	/** full constructor */
	public TblShopcarId(Integer shopcarId, User user, TblItems tblItems,
			Date date, Integer num) {
		this.shopcarId = shopcarId;
		this.user = user;
		this.tblItems = tblItems;
		this.date = date;
		this.num = num;
	}

	// Property accessors

	public Integer getShopcarId() {
		return this.shopcarId;
	}

	public void setShopcarId(Integer shopcarId) {
		this.shopcarId = shopcarId;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public TblItems getTblItems() {
		return this.tblItems;
	}

	public void setTblItems(TblItems tblItems) {
		this.tblItems = tblItems;
	}

	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Integer getNum() {
		return this.num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TblShopcarId))
			return false;
		TblShopcarId castOther = (TblShopcarId) other;

		return ((this.getShopcarId() == castOther.getShopcarId()) || (this
				.getShopcarId() != null
				&& castOther.getShopcarId() != null && this.getShopcarId()
				.equals(castOther.getShopcarId())))
				&& ((this.getUser() == castOther.getUser()) || (this.getUser() != null
						&& castOther.getUser() != null && this.getUser()
						.equals(castOther.getUser())))
				&& ((this.getTblItems() == castOther.getTblItems()) || (this
						.getTblItems() != null
						&& castOther.getTblItems() != null && this
						.getTblItems().equals(castOther.getTblItems())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())))
				&& ((this.getNum() == castOther.getNum()) || (this.getNum() != null
						&& castOther.getNum() != null && this.getNum().equals(
						castOther.getNum())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getShopcarId() == null ? 0 : this.getShopcarId().hashCode());
		result = 37 * result
				+ (getUser() == null ? 0 : this.getUser().hashCode());
		result = 37 * result
				+ (getTblItems() == null ? 0 : this.getTblItems().hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		result = 37 * result
				+ (getNum() == null ? 0 : this.getNum().hashCode());
		return result;
	}

}